<%--
  Created by IntelliJ IDEA.
  User: LiuShihao
  Date: 2020/3/22
  Time: 1:39 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<nav class="navbar-inverse">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="#">宾馆客房管理系统 : </a>
        </div>
        <div class="collapse navbar-collapse"
             id="bs-example-navbar-collapse-9">
            <ul class="nav navbar-nav">
                <li class="l1" ><a href="${pageContext.request.contextPath}/room/list.do">客房管理</a></li>
                <li class="l1"><a href="${pageContext.request.contextPath}/order/list.do">订单管理</a></li>
                <li class="l1"><a href="${pageContext.request.contextPath}/customer/list.do">客户管理</a></li>
                <li class="l1"><a href="${pageContext.request.contextPath}/user/list.do">员工管理</a></li>
                <li class="l1"><a href="${pageContext.request.contextPath}/behind/Mouth.jsp">月营业额统计</a></li>
                <li class="l1"><a href="${pageContext.request.contextPath}/behind/Year.jsp">年营业额统计</a></li>


            </ul>
            <p class="navbar-text navbar-right">
                <span>${username}</span> <i class="glyphicon glyphicon-log-in" aria-hidden="true"></i>&nbsp;&nbsp;
                <a href="${pageContext.request.contextPath}/exit.do" class="navbar-link">退出</a>
            </p>
        </div>
    </div>
</nav>
<script type="text/javascript">
    // var lis = document.getElementsByTagName("li");
    // // 遍历
    // for(var i = 0;i < lis.length;i++){
    //     // 给每一个li标签绑定点击事件
    //     lis[i].onclick = function () {
    //         // 在设置新的样式之前,把所以标签的样式都取消
    //         for(var i2 = 0;i2 < lis.length;i2++){
    //             lis[i2].className="";
    //         }
    //         // 再重新设置
    //         this.className = "active";
    //     }
    // }
    // $(document).ready(function (){
    //     $(".l1").each(function(index){
    //         $(this).click(function(){
    //             $(".l1").removeClass("active");
    //             alert(index)
    //             $(".l1").eq(index).addClass("active");
    //         });
    //     });
    // });
</script>

